]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/scroll-bar: Fix vertical scrollbars in RTL locales
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 8 Jul 2021 21:42:49 +0000 (23:42 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 8 Jul 2021 23:12:26 +0000 (23:12 +0000)
Commit 0db41a3773e fixed the handling of horizontal scrollbars in
RTL locales, but accidentally applied the translation to *all*
scrollbars when handling handle drags and paging. Fix this by
limiting the mirroring to horizontal bars.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4458

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1910>

src/st/st-scroll-bar.c

index 59e9ca820745496387d4cb4b2e58ad148c33b159..01674df65dddb79bcb128e3769dfa5ea13bf1b41 100644 (file)
@@ -633,7 +633,7 @@ move_slider (StScrollBar *bar,
                             &page_size);
 
   direction = clutter_actor_get_text_direction (CLUTTER_ACTOR (bar));
-  if (direction == CLUTTER_TEXT_DIRECTION_RTL)
+  if (!priv->vertical && direction == CLUTTER_TEXT_DIRECTION_RTL)
     pos = size - pos;
 
   position = ((pos / size)
@@ -778,7 +778,7 @@ trough_paging_cb (StScrollBar *self)
                                        &tx, &ty);
 
   direction = clutter_actor_get_text_direction (CLUTTER_ACTOR (self));
-  if (direction == CLUTTER_TEXT_DIRECTION_RTL)
+  if (!priv->vertical && direction == CLUTTER_TEXT_DIRECTION_RTL)
     page_increment *= -1;
 
   if (priv->vertical)